<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        div {
            width: 150px;
            height: 50px;
            background-color: pink;
        }
        /* 在div盒子里面内容前面加一个行内元素的小盒子,将他转换为行内块元素可以为其设置宽、高 */
        div::before {
            display: inline-block;
            content: '我';
            width: 30px;
            height: 20px;
            background-color: skyblue;
        }
        div::after {
            content: '小猪佩奇';
        }
    </style>
</head>
<body>
    <div>
        是
    </div>
</body>
</html>